cmake_minimum_required(VERSION 2.8.3)

set(CMAKE_CXX_FLAGS -std=c++11)

file(GLOB SRC_LIST "*.cpp" "*.c" "xcommunication/*.cpp" "xcommunication/*.c" "xstypes/*.cpp" "xstypes/*.c")
list(REMOVE_ITEM SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/xstypes/xstypesdynlib.c)

include_directories(
	include
	include/xcommunication
	include/xsens
	${catkin_INCLUDE_DIRS}
	)

add_executable(xsens_node ${SRC_LIST})
target_link_libraries(xsens_node ${catkin_LIBRARIES} dl)

install(TARGETS xsens_node
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
